package com.zyz.service;

import java.util.List;

import com.mysql.jdbc.UpdatableResultSet;
import com.zyz.dao.FileDao;
import com.zyz.dao.ShareDao;
import com.zyz.entity.File1;
import com.zyz.entity.Share;

public class ShareService {

	ShareDao shareDao = new ShareDao();
	
	
	public void addShareFile(int fileId,String fileName,String commonName,String path){
		
		shareDao.addShareFile(fileId,fileName ,commonName,path);
		}
	
	
	public void delete(int fileId){
		
		shareDao.delet(fileId);
		}
    
    public List<Share> queryShareFile(){
		
		List<Share> listFile =shareDao.findShareFile();
		
	
		return listFile;
		
		
		
		}
    
    public  void  updateShare (int id, String commonName){
    	
    	shareDao.update(id, commonName);
    	
    	
    }
}
